<?php
/**
 * Created by PhpStorm.
 * User: Plutoer
 * Date: 2019/1/27
 * Time: 12:25
 * @module {name}
 */

$serv = new swoole_server('0.0.0.1',9502,SWOOLE_PROCESS,SWOOLE_SOCK_UDP);

$serv ->on('Packet',function ($serv,$data,$clientINfo){
 $serv->sendto($clientINfo['address'],$clientINfo['port'],'Server'.$data);
 var_dump($clientINfo);
});

$serv->start();